<?php

require_once('connect.php');

$STH = $DBH->query('SELECT name, type, description from Offer ORDER BY RAND() LIMIT 1');
 
$STH->setFetchMode(PDO::FETCH_ASSOC);

$row = $STH->fetch();
 
echo json_encode($row);

?>